package gwtappcontainer.shared.apis.admin;

import java.util.List;

public class UserProp {
	public long id;
	public String email;
	
	public List<RoleProp> roles;
	
	public boolean hasRole(String roleString) {
		if (null == roles) {
			return false;
		}
		
		roleString = roleString.toUpperCase();
		for (RoleProp roleProp : roles) {
			if (roleProp.name.toUpperCase().equals(roleString))
				return true;
		}
		
		return false;
	}
}
